﻿using System;

class ElementBiggerThanNeighbours
{
    static void Main()
    {
        int[] array = { 1, 300, 6, 6, 6, 8, 7, 98, 6, 9, 4, 12, 6 };
        int position = 1;

        bool result = isItBiggerThanNeighbours(array, position);

        Console.WriteLine("It is {0} that the neighbours are smaller than the element!",result);
    }

    private static bool isItBiggerThanNeighbours(int[] array, int position)
    {
        bool answer=new bool();
        if (position > 0 && position < array.Length - 1)
        {
            if (array[position - 1] < array[position] && array[position + 1] < array[position])
            {
                answer=true;;
            }
        }
        return answer;
    }
}